home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / XML Writer 2.12 / XML writer.exe / file0008.bin < prev    next >
Encoding:
Extensible Markup Language  |  2003-04-14  |  5.2 KB  |  140 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!--See LibrarySchema.xml for details on how to use this XSD Schema for validation-->
  4.  
  5. <!--The 'schema' element indicates that the syntax used in the XML Schema,
  6.     prefixed with 'xsd:', comes from the "http://www.w3.org/2001/XMLSchema" namespace.-->
  7. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  8.  
  9.     <!--The 'author' element contains a sequence of child elements 'first-name' and
  10.         'last-name'. These child elements are defined at lines 125 and 98. Elements
  11.         that contain other elements are of complex type.-->
  12.     <xsd:element name="author">
  13.         <xsd:complexType>
  14.             <xsd:sequence>
  15.                 <xsd:element ref="first-name"/>
  16.                 <xsd:element ref="last-name"/>
  17.             </xsd:sequence>
  18.         </xsd:complexType>
  19.     </xsd:element>
  20.     
  21.     <!--The 'book' element contains a sequence of child elements.
  22.         See the end of file    for each child's definition.-->
  23.     <xsd:element name="book">
  24.         <xsd:complexType>
  25.             <xsd:sequence>
  26.                 <!--The default value of minOccurs and maxOccurs is 1 if no other
  27.                     value is specified.-->
  28.                 <xsd:element ref="publisher"/>
  29.                 <xsd:element ref="title"/>
  30.                 <xsd:element ref="edition" minOccurs="0" maxOccurs="1"/>
  31.                 <xsd:element ref="author" minOccurs="1" maxOccurs="unbounded"/>
  32.                 <xsd:element ref="isbn"/>
  33.                 <xsd:element ref="callno"/>
  34.                 <xsd:element ref="online_url" minOccurs="0" maxOccurs="1"/>
  35.             </xsd:sequence>
  36.             <!--'status' is an attribute of the element 'book', and is an enumerated
  37.                 type. See line 117 for the possible choices of 'bookstatustype'.
  38.                 By default attributes are optional. 'use' allows you to specify
  39.                 whether the attribute is 'optional', 'required', or 'prohibited'.-->
  40.             <xsd:attribute name="status" use="required" type="bookstatustype"/>
  41.         </xsd:complexType>
  42.     </xsd:element>
  43.     
  44.     <!--The 'director' element contains a child element 'name'.-->
  45.     <xsd:element name="director">
  46.         <xsd:complexType>
  47.             <xsd:sequence>
  48.                 <xsd:element ref="name"/>
  49.             </xsd:sequence>
  50.         </xsd:complexType>
  51.     </xsd:element>
  52.     
  53.     <!--The 'library' element references the complex type elements 'book',
  54.         'journal', and 'video'.-->
  55.     <xsd:element name="library">
  56.         <xsd:complexType>
  57.             <xsd:sequence>
  58.                 <xsd:element ref="name"/>
  59.                 <xsd:element ref="book" minOccurs="0" maxOccurs="unbounded"/>
  60.                 <xsd:element ref="journal" minOccurs="0" maxOccurs="unbounded"/>
  61.                 <xsd:element ref="video" minOccurs="0" maxOccurs="unbounded"/>
  62.             </xsd:sequence>
  63.         </xsd:complexType>
  64.     </xsd:element>
  65.     
  66.     <!--The 'video' element contains a sequence of child elements.
  67.         See the end of file    for each child's definition.-->
  68.     <xsd:element name="video">
  69.         <xsd:complexType>
  70.             <xsd:sequence>
  71.                 <xsd:element ref="title"/>
  72.                 <xsd:element ref="year"/>
  73.                 <xsd:element ref="director" minOccurs="1" maxOccurs="unbounded"/>
  74.                 <xsd:element ref="genre" minOccurs="1" maxOccurs="unbounded"/>
  75.                 <xsd:element ref="callno"/>
  76.             </xsd:sequence>
  77.             <!--'status' is an attribute of the element 'video', and is an enumerated
  78.                 type. See line 104 for the possible choices of 'videostatustype'.-->
  79.             <xsd:attribute name="status" use="required" type="videostatustype"/>
  80.         </xsd:complexType>
  81.     </xsd:element>
  82.     
  83.     <!--The 'journal' element contains  a sequence of child elements.
  84.         See the end of file    for each child's definition.-->
  85.     <xsd:element name="journal">
  86.         <xsd:complexType>
  87.             <xsd:sequence>
  88.                 <xsd:element ref="title"/>
  89.                 <xsd:element ref="date"/>
  90.                 <xsd:element ref="author" minOccurs="0" maxOccurs="unbounded"/>
  91.                 <xsd:element ref="callno"/>
  92.             </xsd:sequence>
  93.             <!--'series' is an attribute of the element 'journal', and may contain
  94.                 a string ie. letters, numbers, or symbols.-->
  95.             <xsd:attribute name="series" use="required" type="xsd:string"/>
  96.         </xsd:complexType>
  97.     </xsd:element>
  98.     
  99.     <!--Define simple type elements.-->
  100.     <xsd:element name="last-name" type="xsd:string"/>
  101.     <xsd:element name="publisher" type="xsd:string"/>
  102.     <xsd:element name="title" type="xsd:string"/>
  103.     
  104.     <!--Define the attribute values for 'status', an enumerated attribute
  105.         of the 'video' element.-->
  106.     <xsd:simpleType name="videostatustype">
  107.         <xsd:restriction base="xsd:string">
  108.             <xsd:enumeration value="available"/>
  109.             <xsd:enumeration value="on_loan"/>
  110.         </xsd:restriction>
  111.     </xsd:simpleType>
  112.     
  113.     <!--Define simple type elements.-->
  114.     <xsd:element name="isbn" type="xsd:string"/>
  115.     <xsd:element name="online_url" type="xsd:string"/>
  116.     
  117.     <!--Define the attribute values for 'status', an enumerated attribute
  118.         of the 'book' element.-->
  119.     <xsd:simpleType name="bookstatustype">
  120.         <xsd:restriction base="xsd:string">
  121.             <xsd:enumeration value="available"/>
  122.             <xsd:enumeration value="on_loan"/>
  123.         </xsd:restriction>
  124.     </xsd:simpleType>
  125.     
  126.     <!--Define simple type elements.-->
  127.     <xsd:element name="first-name" type="xsd:string"/>
  128.     <xsd:element name="edition" type="xsd:string"/>
  129.     <xsd:element name="name" type="xsd:string"/>
  130.     <xsd:element name="genre" type="xsd:string"/>
  131.     <xsd:element name="year" type="xsd:string"/>
  132.     <xsd:element name="date" type="xsd:string"/>
  133.     <xsd:element name="callno" type="xsd:string"/>
  134.     
  135. </xsd:schema>
  136.  
  137. <!--This file was created using XMLwriter v2.0 Beta 2.
  138.     Copyright Wattle Software 2002. All rights reserved.
  139.     http://XMLwriter.net/-->
  140.